//
//  CustomBackView.swift
//  DEAPP
//
//  Created by MoennigQ on 10/12/19.
//  Copyright © 2019 Client.Solution Pty Ltd. All rights reserved.
//

import UIKit

class CustomBackView: UIView {
    var corners: UIRectCorner = UIRectCorner.allCorners {
        didSet {
            self.drawCorner(byRoundingCorners: corners)
        }
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.initShadow()
        self.setUpView()
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    //MARK: - 白色背景的带shadow的
    private func initShadow(){
        self.backgroundColor = UIColor.white
        self.layer.shadowOffset = CGSize(width: 0, height: 4)
        self.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.06).cgColor
        self.layer.shadowOpacity = 1
        self.layer.shadowRadius = 10
        self.drawCorner(byRoundingCorners: UIRectCorner.allCorners)
    }
    func setUpView(){
        
    }
}
